Ext.ux.OptionContentPanel = function() {
	var desktop = MyDesktop.getDesktop();
	var win_option_content = desktop.getWindow('option-content-win');
	if (!win_option_content) {
		var _jsonReaderc = new Ext.data.JsonReader({
					root : 'results'
					,totalProperty : 'totalCount'
				}, [{
							name : 'id',
							mapping : 'id'
						},{
							name : 'content',
							mapping : 'content'
						},{
							name : 'date',
							mapping : 'date'
						}]);
		var ds_ocontent = new Ext.data.Store({
					proxy : new Ext.data.HttpProxy({
								url : '/admin/content.jhtml?method=getContents&optionId='+publicCId
							}),
					reader : _jsonReaderc
				});
		var cm_keyword = new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),
				new Ext.grid.CheckboxSelectionModel(), {
					header : "编号",
					width : 80,
					sortable : true,
					dataIndex : 'id'
				},{
					header : "内容",
					width : 200,
					sortable : true,
					dataIndex : 'content'
				},{
					header : "时间",
					width : 100,
					sortable : true,
					dataIndex : 'date'
				}]);
		var grid_ocontent = new Ext.grid.GridPanel({
			region : "center",
			cm : cm_keyword,
			sm : new Ext.grid.CheckboxSelectionModel(),
			border : false,
			loadMask : {
				msg : "数据加载中，请稍等..."
			},
			store : ds_ocontent,
			viewConfig : {
				forceFit : true
			},
			bbar : golbalBBar(ds_ocontent,20),
			tbar : [{
                
			text : '删除',
			tooltip : '挂起选中的一个',
			iconCls : 'remove',
			handler : function() {

				var rows = grid_ocontent.getSelectionModel().getSelections();// 返回值为
				// Record
				// 数组
				if (rows.length == 0) {
					getAlertMessage("警告","最少选择一条信息，进行删除!",Ext.MessageBox.WARNING);
				} else {
					Ext.MessageBox.confirm('提示框', '您确定要进行该操作？', function(btn) {
						if (btn == 'yes') {

							if (rows) {
								for (var i = 0; i < rows.length; i++) {
									var conn = new Ext.data.Connection();
									conn.request({
										url : '/admin/content.jhtml?method=deleteContent',
										params : {
											contentId : rows[i]
													.get("id")
										}

									});

									break;
								}

							}
							loadDs(ds_ocontent,20);
						}
					});
				} // 弹出对话框警告
			}
		
                }]
		});
		win_option_content = desktop.createWindow({
					id : 'option-content-win',
					title : '选项内容管理',
					width : 740,
					height : 480,
					iconCls : 'icon-grid',
					shim : false,
					animCollapse : false,
					constrainHeader : true,
					layout : 'fit',
					items : grid_ocontent
				});
				loadDs(ds_ocontent,20);
	}
	win_option_content.show();
}